package com.road.vast.controller;

import org.springframework.web.bind.annotation.ModelAttribute;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @Author 郭泽鹏
 * @Date 2020/7/11 8:14
 * @Version 1.0
 * @Description 抽取控制层的公共代码部分
 */
public class BaseController {
    protected HttpServletRequest request;
    protected HttpServletResponse response;
    protected String companyId;
    protected String companyName;

    @ModelAttribute
    public void setResAndReq(HttpServletRequest request, HttpServletResponse response){
        this.request = request;
        this.response = response;
        /**
         * 目前使用companyId = "1279391419991134208"
         *      companyName = "甲公司"
         */
        this.companyId = "1279391419991134208";
        this.companyName = "甲公司";
    }
}
